Skip to content

fix(server): wake a PR watch when checks still running after a failure finish - #8

Merged
caniko merged 1 commit into
mainfrom
fix/pr-watch-settled-after-failure
Nov 9, 2026
Merged

caniko merged 1 commit into
mainfrom
fix/pr-watch-settled-after-failure

Conversation

@caniko

@caniko caniko commented Nov 9, 2026

Copy link
Copy Markdown
Owner

A failure wake tells the agent to end its turn and says T3 Code wakes it on the next change. If other checks were still running at that point, their finish woke nobody. A wake needed a newly failed check or a green gate, and the owed-checks path only ran after a pass. An agent that ended its turn to wait for the rest of the run stayed asleep.

Seen on caniko/paperclip#18. Wakes fired for review (13:44Z) and profile retention (14:55Z). The agent ended its turn while three exact-head lanes were still pending. They finished by 17:31Z with no new failures, and no wake came.

Fix: a failure wake now saves the checks still pending in owedChecks. Once they have all finished with no new failure, the watch wakes once with All N checks finished on <sha>, and M failed: and lists the current failures. A new failure among them still reports as checks-failed, so no second wake is sent.

Checks: a new case in pullRequestWatch.test.ts fails on main and passes with the fix. vp run check:changed passes format, lint, typecheck and tests. knip 2/2 reports unused exports in apps/server/src/runner/*, which main already has. I didn't run the paid evals. The wake text adds one new line and leaves the existing lines unchanged.

🤖 Generated with Claude Code

…e finish

A failure wake tells the agent to end its turn and promises a wake on the
next change. When other checks were still running, nothing woke the agent
once they finished: a wake needed a newly failed check or a green gate,
and the owed-checks path only ran after a pass. An agent waiting on the
rest of a run after one early failure stayed asleep for good.

A failure wake now records the checks still pending as owed. When they
have all finished with no new failure, the watch wakes once with
"All N checks finished, and M failed" and lists the current failures.
A new failure among them still reports as a plain failure.
@caniko
caniko merged commit 90456fd into main Nov 9, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant